main()
{
 int i,b,s,g;
 for (i=100;i<1000;i++)
 { 
	 b=i/100;
	 s=i/10-b*10;
	 g=i%10;
	 if (i==b*b*b+s*s*s+g*g*g)
	  printf("%d\n",i);}
}

